Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log parsed files to Maven debug log #616

Closed
wants to merge 2 commits into from

Conversation

timtebeek
Copy link
Contributor

What's changed?

We now debug log parsed files through the progress bar interface added to rewrite-all, such that we can optionally swap in a different

What's your motivation?

Fixes #544

Anything in particular you'd like reviewers to focus on?

Right now rewrite-all has runtime only dependencies; do we expect that to stay that way?
If those runtime dependencies change into transitive dependencies that could increase the cumulative runtime size here.

Have you considered any alternatives or workarounds?

This minimal implementation for now only prints parsed files when running the OpenRewrite parsers, as Maven itself already logs the session, projects and mojos. No need to duplicate that here.

@timtebeek timtebeek self-assigned this Aug 10, 2023
@timtebeek timtebeek requested review from joanvr and rpau August 10, 2023 14:22
@timtebeek timtebeek added the enhancement New feature or request label Aug 10, 2023

@Override
public void parsed(Parser.Input input, SourceFile sourceFile) {
progressBar.intermediateResult("Parsed " + input.getPath());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want to add any details here based on the produced SourceFile or ParseError?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect anyway, as it is called after the file is parsed.


@Override
public void parsed(Parser.Input input, SourceFile sourceFile) {
progressBar.intermediateResult("Parsed " + input.getPath());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect anyway, as it is called after the file is parsed.

@timtebeek
Copy link
Contributor Author

Closed as requested while we explore alternatives to report progress instead of logging.

@timtebeek timtebeek closed this Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Honor maven debug mode to log progress
2 participants